package com.net.service.sell.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.net.dao.sell.SellMainDao;
import com.net.model.SellMain;
import com.net.service.sell.SellService;
@Component("sellService")
public class SellServiceImpl implements SellService {

	private SellMainDao sellMainDao;
	
	public void add(SellMain sellMain) {
		sellMainDao.save(sellMain);
	}

	public boolean delete(SellMain sellMain) {
		return sellMainDao.delete(sellMain);
	}

	public int getCount() {
		return sellMainDao.getCount();
	}

	public List<SellMain> getSellMains(int currentPage, int perPage,
			String orderType, String orderName) {
		return sellMainDao.getSellMains(currentPage, perPage, orderType, orderName);
	}

	public List<SellMain> getSellMainsByCondition(int currentPage, int perPage,
			String condition) {
		return sellMainDao.getSellMainsByCondition(currentPage, perPage, condition);
	}

	public SellMain loadSellMainById(int id) {
		return sellMainDao.loadSellMainById(id);
	}

	public SellMain loadSellMainByName(String name) {
		return sellMainDao.loadSellMainByName(name);
	}

	public void update(SellMain sellMain) {
		sellMainDao.update(sellMain);
	}

	public SellMainDao getSellMainDao() {
		return sellMainDao;
	}
	@Resource(name="sellMainDao")
	public void setSellMainDao(SellMainDao sellMainDao) {
		this.sellMainDao = sellMainDao;
	}
}
